import React from "react"
import Suit from "./suit"


class Ppd extends React.Component {
    state = {
        name: "ppd",
        age: 35,
        hobby: "玩诺手，吊打大司马",
        nickname: "骚猪"
    }
    render() {
       
        let {skill,weapon,nickname,attack}=this.props
        return (
            <fieldset>
                <legend>ppd</legend>
                <h1>姓名：{this.state.name}</h1>
                <h1>年龄：{this.state.age}</h1>
                <h1>昵称：{nickname?nickname:this.state.nickname}</h1>
                <h1>爱好：{this.state.hobby}</h1>
                <h1>技能：{skill?skill:"骚猪怒吼"}</h1>
                <h1>武器：{weapon?weapon:"一q二a三w"}</h1>
                <h1>属性：{weapon?weapon:"一q二a三w"}</h1>
                <button onClick={attack}>点击触发技能</button>
            </fieldset>
        )
    }
}

export default Suit( Ppd)